<?php
	include('conn.php');
	$p = $_POST;
	$id=  $_POST['id'];
	$time = time();
	$sql = "update data set name='{$p['name']}',sex=null, `write`='{$p['write']}', time=$time where id=$id";
	//write是关键字;
	//var_dump($sql);
	mysql_query($sql,$conn);
	header("Location:index.php");
	
?>